﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace UmbracoXsltEditor.Controls
{
    [System.ComponentModel.DesignerCategory("code")]
    [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip)]
    public partial class ToolStripTreeView : ToolStripControlHost
    {
        public ToolStripTreeView() : base(CreateControlInstance())
        {          
        }

        public ToolStripDropDown ToolStripDropDown
        {
            get { return Control as ToolStripDropDown; }
        }

        private static Control CreateControlInstance()
        {
            TreeView view = new TreeView();
            TreeNode node = new TreeNode("Test");
            view.Nodes.Add(node);

            ToolStripDropDown drop = new ToolStripDropDown();
            

            drop.Controls.Add(view);

            return drop;
        }


    }
}
